#ifndef __FLVECTOR2_H__
#define __FLVECTOR2_H__

/*
	-== Description ==-

	Vector with 2 points class, some of this code is from
	and addon of openFrameworks, other parts are from different
	functions found on the net

	TODO:
	- Check if you need
*/

/*
	src: openFrameworks v0062 > addons/ofxVec2.h
*/

class flVector2
{
	public:
		// Variables
		float x, y;
		// Constructor
		flVector2(float _x = 0, float _y = 0);
		// Set
		void set(float _x, float _y);
		
		/*
			Overloading operators
		*/
		// Check similar
		bool operator==(const flVector2& v);
		bool operator!=(const flVector2& v);

		// Functions with other Vector2
		void		operator=	(const flVector2& v);
		flVector2	operator+	(const flVector2& v) const;
		flVector2&	operator+=	(const flVector2& v);
		flVector2	operator-	(const flVector2& v) const;
		flVector2&	operator-=	(const flVector2& v);
		flVector2	operator*	(const flVector2& v) const;
		flVector2&	operator*=	(const flVector2& v);
		flVector2	operator/	(const flVector2& v) const;
		flVector2&	operator/=	(const flVector2& v);

		// Functions with float
		void		operator=	(const float f);
		flVector2	operator+	(const float f) const;
		flVector2&	operator+=	(const float f);
		flVector2	operator-	(const float f) const;
		flVector2&	operator-=	(const float f);
		flVector2	operator*	(const float f) const;
		flVector2&	operator*=	(const float f);
		flVector2	operator/	(const float f) const;
		flVector2&	operator/=	(const float f);
};
#endif